package Tests;


import Common.TestBase;

import org.testng.annotations.*;

import java.lang.reflect.Method;

import static org.testng.Assert.assertFalse;
import static org.testng.Assert.assertTrue;
import static org.testng.Assert.assertEquals;

/**
 * LogIn tests. This function is not fully realized on site. Could be failed if you try to move mouse.
 */
public class LogInTest extends TestBase {

    @BeforeMethod (groups = {"done","nonstable"})
    public void beforeMethod(final Method method) {
        hb.openBaseUrl();
    }
    //Positive test
    @Test (groups = { "done" })
    public void logInTest(){
        application.goToLogInPage();
        if (application.isLogin()) application.authorization();
        assertTrue(application.isLogin());
    }

    //Negative test
    @Test (groups = { "done" })
    public void logInTest2(){
        application.goToLogInPage();
        if (application.isLogin()) application.authorizationWithWrongPass();
        assertTrue(application.isLogin());
    }


}